<template>
  <div class="navbar">
    <div class="nav-name">
      <h1>Lime_Blog</h1>
    </div>
    <ul class="nav-menu">
      <li>
        <nuxt-link to="/">
          <svg-icon icon-class="home" />
          Home
        </nuxt-link>
        <span></span>
      </li>
      <li>
        <nuxt-link to="/filed">
          <svg-icon icon-class="blog" />
          Blog
        </nuxt-link>
        <span></span>
      </li>
      <li>
        <nuxt-link to="/album">
          <svg-icon icon-class="album" />
          Album
        </nuxt-link>
        <span></span>
      </li>

      <!-- <li>
        <nuxt-link to="/posted">留言</nuxt-link>
      </li> -->
      <li>
        <nuxt-link to="/about">
          <svg-icon icon-class="about" />
          About
        </nuxt-link>
        <span></span>
      </li>
    </ul>
  </div>
</template>

<style lang="less" scoped>
.navbar {
  .nav-name {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    h1 {
      font-size: 24px;
      color: #000;
      cursor: pointer;
    }
    h1:hover {
      color: #fff;

      text-shadow: 0 0 10px #000, 0 0 20px #000, 0 0 40px #000, 0 0 80px #000,
        0 0 120px #000;
    }
  }
  .nav-menu {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    margin-right: 10.5rem;
    height: 100%;
    li {
      padding: 0 20px;
      margin: 0;
      height: 100%;
      color: #000;
      cursor: pointer;
      transition: color 300ms ease 0s;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      a {
        flex: 1;
        text-decoration: none;
        font-size: 20px;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        svg {
          margin-right: 5px;
        }
      }
      span {
        height: 5px;
        display: block;
        width: 0;
        background: rgb(251, 161, 1);
      }
    }
    li:hover {
      a {
        color: rgb(251, 161, 1);
      }
      span {
        width: 100%;
        transition: width 0.8s;
      }
      svg {
        -webkit-animation: rotate-center 0.8s ease-in-out both;
        animation: rotate-center 0.8s ease-in-out both;
        color: rgb(251, 161, 1);
      }
    }

    @-webkit-keyframes rotate-center {
      0% {
        -webkit-transform: rotate(0);
        transform: rotate(0);
      }
      100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
      }
    }
    @keyframes rotate-center {
      0% {
        -webkit-transform: rotate(0);
        transform: rotate(0);
      }
      100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
      }
    }
  }
}
</style>
